<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>注册志愿者</title>
    <script type="text/javascript" src="${ctx}/static/js/jsAddress.js"></script>
</head>
<body>
<div class="content">
    <c:if test="${not empty message}">
        <div class="alert alert-success alert-dismissable" style="text-align: center;">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">
                ×
            </button>
                ${message}
        </div>
    </c:if>

    <form id="inputForm" action="${ctx}/volunteer${action}" method="post" class="form-horizontal">
        <input type="hidden" id="id" name="id" value="${newVolunteer.id}">
            <div class="form-group">
                <h3 class="item-title">基础信息</h3>
                <div class="form-item">
                    <label for="">手机号</label>
                    <input type="text" class="form-control" id="mobile" name="mobile" value="${newVolunteer.mobile}" placeholder="">
                </div>
                <div class="form-item">
                    <label for="">密码</label>
                    <input type="password" class="form-control" id="weChat" name="weChat" value="${newVolonteer.weChat}" placeholder="">
                </div>

                <div class="form-item">
                    <label for="">证件类型</label>
                    <select class="form-control" name="cardType">
                        <c:forEach items="${cardType}" var="skill">
                            <option value="${skill.code}">${skill.name}</option>
                        </c:forEach>
                    </select>
                </div>
                <div class="form-item">
                    <label for="">证件号</label>
                    <input type="text" class="form-control" id="cardNO" name="cardNO" value="${newVolonteer.cardNO}" placeholder="">
                </div>
                <div class="form-item">
                    <label for="">姓名</label>
                    <input type="text" class="form-control" id="realName" name="realName" value="${newVolonteer.realName}" placeholder="">
                </div>
                <div class="form-item">
                    <label for="">昵称</label>
                    <input type="text" class="form-control" id="nickName" name="nickName" value="${newVolonteer.nickName}" placeholder="">
                </div>
            </div>
            <div class="form-group">
                <h3 class="item-title">志愿服务信息</h3>
                <div class="form-item">
                    <label class="form-item-title" for="">职业</label>
                    <c:forEach items="${userJob}" var="skill">
                    <div class="checkbox checkbox-item">
                        <label><input type="checkbox" name="job" value="${skill.name}">${skill.name}</label>
                    </div>
                    </c:forEach>
                </div>
                <div class="form-item">
                    <label class="form-item-title" for="">专业技能</label>
                    <c:forEach items="${userSkill}" var="skill">
                    <div class="checkbox checkbox-item">
                        <label><input type="checkbox" name="skill" value="${skill.name}">${skill.name}</label>
                    </div>
                    </c:forEach>
                </div>
                <div class="form-item">
                    <label class="form-item-title" for="">意向服务领域</label>
                    <c:forEach items="${userServiceFiled}" var="skill">
                    <div class="checkbox checkbox-item">
                        <label><input type="checkbox" name="serviceField" value="${skill.name}"> ${skill.name}</label>
                    </div>
                    </c:forEach>
                </div>
            </div>
            <div class="form-group">
                <h3 class="item-title">个人信息</h3>
                <div class="form-item">
                    <label for="">所在地区</label>

                    <div class="region">
                        <div class="form-item">
                            <select class="form-control" id="cmbProvince" name="prvoince"></select>
                        </div>
                        <div class="form-item">
                            <select class="form-control" id="cmbCity" name="city"></select>
                        </div>
                        <div class="form-item">
                            <select class="form-control" id="cmbArea" name="district"></select>
                        </div>
                        <script type="text/javascript">
                            addressInit('cmbProvince', 'cmbCity', 'cmbArea', '${newGroup.prvoince}', '${newGroup.city}', '${newGroup.district}');
                        </script>
                    </div>
                </div>

                <!--
                <div class="form-item">
                    <label for="">头像</label>
                    <div class="form-item-image-upload">
                        <div class="image-preview-box"><img alt="" src="assets/160x160.png"></div>
                        <input type="file" id="" placeholder="">
                        <p class="help-block">你可以上传 JPG、JPEG、GIF、PNG 或 BMP 文件。</p>
                    </div>
                </div>
                -->
                <div class="form-item">
                    <label for="">个人签名</label>
                    <textarea class="form-control" id="sign" name="sign">${newVolunteer.sign}</textarea>
                </div>
            </div>
            <div>
                <!--
                <button class="btn" onclick="history.go(-1);">取消</button>
                -->
                <button class="btn">保存</button>
            </div>
        </form>
</div>
</body>
</html>